package com.peanut.devlibrary.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;

public class FragmentTabAdapter extends FragmentPagerAdapter {
	private ArrayList<Fragment> mViews;
    public FragmentTabAdapter(FragmentManager mgr, ArrayList<Fragment> views) {
        super(mgr);
        this.mViews = views;
    }

    @Override
    public Fragment getItem(int pos) {
        return this.mViews.get(pos);
    }

    @Override
    public int getCount() {
        return this.mViews.size();
    }
}
